audio: check for NULL buffers in case of invalid IPC flows#9985
Merged
kv2019i merged 2 commits intothesofproject:mainfrom May 5, 2025
Merged
audio: check for NULL buffers in case of invalid IPC flows#9985kv2019i merged 2 commits intothesofproject:mainfrom
kv2019i merged 2 commits intothesofproject:mainfrom
Conversation
If .trigger() is wrongly called on a pipeline, that isn't connected to a DAI, its edge component will hit a NULL buffer, which then has to be checked. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
It is possible that both the source and the sink component are inactive in ipc_buffer_free(), Add an explicit check for this. The present code behaves correctly now as well, because it checks for active_comp->state > COMP_STATE_READY, but active component misidentification is confusing. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Collaborator
|
@lyakh this is awesome. I have hit this several times if the order in which the widgets are set up and connected doesnt confirm to the source->sink ordering. How did you discover this? |
Collaborator
Author
kv2019i
approved these changes
May 2, 2025
lgirdwood
approved these changes
May 3, 2025
Member
|
@lgirdwood Internal Intel CI build and tests passed :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An invalid IPC flow can trigger a NULL pointer dereference when handling a
TRIGGERoperation. Add the missing checks.